home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_panelsay.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  86 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_PanelSay.cog
  4. #
  5. # Indy notices that there is another car on the tracks after he replaces
  6. # the fuse and then walks around the control panel and looks at it.
  7. # Handles south and west facing directions.
  8. #
  9. # [TRM & SXC]
  10. #
  11. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  12. # ========================================================================================
  13.  
  14. symbols
  15.  
  16.     message     user0
  17.     message     user1
  18.     message     entered
  19.     
  20.     Thing       player      local
  21.     
  22.     surface     theSpot1
  23.     surface     theSpot2
  24.     
  25.     sound       inSay1=Sl02j05.wav      local       # Hey! There's another...
  26.     
  27.     vector      playervec       local
  28.     
  29.     float       playery=0        local
  30.     float       playerx=0        local
  31.     
  32.     int         set=0           local
  33.     int         done=0          local
  34.  
  35. end
  36.  
  37. # ========================================================================================
  38.  
  39. code
  40.  
  41. user0:
  42.     
  43.     set = 1;
  44.     return;
  45.     
  46. # ========================================================================================
  47.  
  48. user1:
  49.  
  50.     # received from comFalls.cog
  51.     done = 1;
  52.     return;
  53.  
  54. # ========================================================================================
  55.  
  56. entered:
  57.  
  58.     player = GetLocalPlayerThing();
  59.     playervec = GetThingLVec(player);
  60.     playery = VectorY(playervec);
  61.     playerx = VectorX(playervec);
  62.             
  63.     if((set == 1) && (done == 0))
  64.     {
  65.         if((GetSenderRef() == theSpot1) || (GetSenderRef() == theSpot2))
  66.         {
  67.             done = 1;
  68.             if((playery < 0) && ((playerx > -0.7) && (playerx < 0.7)))
  69.             {
  70.                 PlayVoice(player, inSay1, 1.0, 0);
  71.             }
  72.                 
  73.             else if((playerx < 0) && ((playery > -0.7) && (playery < 0.7)))
  74.             {
  75.                 PlayVoice(player, inSay1, 1.0, 0);    
  76.             }
  77.         }
  78.     }
  79.    
  80.    return;
  81.  
  82. # ========================================================================================    
  83.  
  84. end
  85.  
  86.